<template>
    <el-steps :active="active">
        <el-step :title="vo.title" v-for="(vo,i) in steps" />
    </el-steps>
</template>

<script setup lang="ts">

import {computed} from "vue";

const steps = [
    {id:'unpaid', title:'待付款'},
    {id:'paid', title:'已付款'},
    {id:'wait', title:'待发货'},
    {id:'receive', title:'待收货'},
    {id:'reply', title:'待评论'},
    {id:'done', title:'已完成'},
]

const props = withDefaults(defineProps<{
    order: Record<string, any>
}>(),{

})

const active = computed(() => {
    let index = steps.findIndex((item:any)=>{
        return item.id == props.order.order_status
    })
    return index+1
})

</script>

<style scoped>

</style>
